<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	compCd		= Request("compCd")
	orderNo		= Request("orderNo")
	major			= Request("major")
	majorPhone	= Request("majorPhone")
	compOrderNo	= Request("compOrderNo")
	orderType		= Request("orderType")
	orderDt			= Request("orderDt")
	totalPrice		= Request("totalPrice")
	orderMemo	= Request("orderMemo")
	flag				= Request("flag")

	If totalPrice = "" Then totalPrice = "0" End If 

	major				= Replace(major,"'","''")
	majorPhone		= Replace(majorPhone,"'","''")
	orderType			= Replace(orderType,"'","''")
	orderMemo		= Replace(orderMemo,"'","''")
	totalPrice			= Replace(totalPrice,",","")
	
	issueId = Request.Cookies("S_uid")
	
	If orderNo = "" Then
		orderNo = aFieldValue("SELECT ISNULL(MAX(orderNo),0)+1 FROM tblCompOrder") 
	End If
	
	SQLTitle = "-- ■■■■ 오더 정보 관리 저장 ■■■■"
	SQL = "exec spCompOrder " & compCd & ", '" & major & "', '" & majorPhone & "', '" & compOrderNo & "', '" & orderDt & "', '" & orderType & "', '" & orderMemo & "', " & totalPrice & ", '" & issueId & "', '" & flag & "', " & orderNo
	
	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

'Response.write SQL
'Response.end
	DbCon.Execute SQL

	Call rsWithXML2("Save OK!",orderNo)
%>